<template>
  <div class="text-message">
    <div v-html="sanitizeHtml(message.content)"></div>
  </div>
</template>

<script>
import sanitizeHtml from "@/utils/sanitize";

export default {
  name: 'TextMessage',
  props: {
    message: {
      type: Object,
      required: true
    }
  },
  methods: {
    sanitizeHtml
  }
}
</script>

<style scoped>
.text-message {
  word-wrap: break-word;
  word-break: break-all;
  white-space: pre-wrap;
}
</style>